package com.xinyiweidai.xinyiweidai.module.message;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * classname: $CLASS_NAME$
 * Data：2018/9/20-14:00
 * Author: lanxiong
 * Description:
 */

public class MessageAdapter extends FragmentPagerAdapter {



    private List<Fragment> fragmentList=new ArrayList<>();
    private String[] titles={"系统公告","我的消息"};


    public MessageAdapter(FragmentManager fm,List<Fragment> fragmentList) {
        super(fm);
        this.fragmentList=fragmentList;
    }


    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
